package com.edu.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class LoginController {

    @RequestMapping("/test")
    public ModelAndView login(){
        ModelAndView mv = new ModelAndView();
        mv.setViewName("main.jsp");//告知最终的视图的名字
        mv.addObject("msg","hello world");// request.setAttribute("msg","hello world");
        return mv;
    }
}
